#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=1e3+100;
typedef long long LL;
const LL mod=998244353;
inline LL read(){LL x=0,f=1;char ch=getchar();	while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}while (isdigit(ch)){x=x*10+ch-48;ch=getchar();}
return x*f;}
LL dp[maxn][maxn*2][5];
int main(void)
{
  cin.tie(0);std::ios::sync_with_stdio(false);
  LL n,k;cin>>n>>k;
  dp[1][1][0]=1;dp[1][2][1]=1;dp[1][2][2]=1;dp[1][1][3]=1;

  for(LL i=2;i<=n;i++){
     for(LL j=1;j<=k;j++){

         dp[i][j][0]+=dp[i-1][j][0]; dp[i][j][0]%=mod;
         dp[i][j][0]+=dp[i-1][j][1]; dp[i][j][0]%=mod;
         dp[i][j][0]+=dp[i-1][j][2]; dp[i][j][0]%=mod;
         dp[i][j][0]+=dp[i-1][j-1][3]; dp[i][j][0]%=mod;

         dp[i][j][1]+=dp[i-1][j-1][0]; dp[i][j][1]%=mod;
         dp[i][j][1]+=dp[i-1][j][1]; dp[i][j][1]%=mod;
         if(j>=2) dp[i][j][1]+=dp[i-1][j-2][2]; dp[i][j][1]%=mod;
         dp[i][j][1]+=dp[i-1][j-1][3]; dp[i][j][1]%=mod;

         dp[i][j][2]+=dp[i-1][j-1][0];    dp[i][j][2]%=mod;
         if(j>=2) dp[i][j][2]+=dp[i-1][j-2][1]; dp[i][j][2]%=mod;
         dp[i][j][2]+=dp[i-1][j][2];    dp[i][j][2]%=mod;
         dp[i][j][2]+=dp[i-1][j-1][3];  dp[i][j][2]%=mod;

         dp[i][j][3]+=dp[i-1][j-1][0];  dp[i][j][3]%=mod;
         dp[i][j][3]+=dp[i-1][j][1];    dp[i][j][3]%=mod;
         dp[i][j][3]+=dp[i-1][j][2];    dp[i][j][3]%=mod;
         dp[i][j][3]+=dp[i-1][j][3];    dp[i][j][3]%=mod;
     }
  }

 /* for(LL i=1;i<=n;i++){
    for(LL j=1;j<=k;j++){
        for(LL c=0;c<4;c++){
            cout<<"dp["<<i<<"]"<<"["<<j<<"]"<<"["<<c<<"]="<<dp[i][j][c]<<" ";
        }
    }
    cout<<"\n";
  }*/


  LL ans=0;
  for(LL c=0;c<4;c++){
    ans=(ans%mod+dp[n][k][c]%mod)%mod;
  }
  cout<<ans<<"\n";
return 0;
}
